﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:local="clr-namespace:Chess" x:Class="Chess.Window1"
    Title="WPF Chess" Height="901" Width="1320" Foreground="{x:Null}" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen">
	<Window.Resources>
		<Storyboard x:Key="OnMouseEnter1"/>
		<Storyboard x:Key="OnMouseLeave1"/>
	</Window.Resources>
	<Canvas>
		<Grid x:Name="grid" Canvas.Left="8" Canvas.Top="8" >
			<Grid.Background>
				<ImageBrush ImageSource="images/framedchessboard.png" />
			</Grid.Background>
			<Grid.RowDefinitions>
				<RowDefinition Height="49" MaxHeight="49" MinHeight="49"/>
				<RowDefinition/>
				<RowDefinition Height="49" MaxHeight="49" MinHeight="49"/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition MaxWidth="50" MinWidth="50" Width="50"/>
				<ColumnDefinition/>
				<ColumnDefinition MaxWidth="51" MinWidth="51" Width="51"/>
			</Grid.ColumnDefinitions>
			<Grid x:Name="Gameboard" Grid.Column="1" Grid.Row="1" MouseRightButtonDown="Gameboard_MouseRightButtonDown" MouseLeftButtonDown="Gameboard_MouseLeftButtonDown" >
				<Grid.Background>
					<ImageBrush ImageSource="images\chessboard.png" />
				</Grid.Background>
				<Grid.RowDefinitions>
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
					<RowDefinition MinHeight="90" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
					<ColumnDefinition MinWidth="90" />
				</Grid.ColumnDefinitions>
			</Grid>
			<Border Grid.Column="1" Grid.Row="1" BorderBrush="Black" BorderThickness="2" Visibility="Hidden" d:IsHidden="True"/>
			<UniformGrid Grid.Column="1" Grid.Row="2" Columns="8" Rows="1">
				<TextBlock HorizontalAlignment="Center" Text="A" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="B" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="C" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="D" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="E" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="F" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="G" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="H" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
				</TextBlock>
			</UniformGrid>
			<UniformGrid Grid.Column="1" Columns="8" Rows="1" RenderTransformOrigin="0.5,0.5">
				<UniformGrid.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="180"/>
						<TranslateTransform/>
					</TransformGroup>
				</UniformGrid.RenderTransform>
				<TextBlock HorizontalAlignment="Center" Text="H" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}" Foreground="{DynamicResource WoodLetter}"/>
				<TextBlock HorizontalAlignment="Center" Text="G" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="F" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="E" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="D" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="C" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="B" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock HorizontalAlignment="Center" Text="A" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}" >
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
				</TextBlock>
			</UniformGrid>
			<UniformGrid RenderTransformOrigin="0.5,0.5" Grid.Column="2" Grid.Row="1" Columns="1" Rows="8">
				<UniformGrid.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="180"/>
						<TranslateTransform/>
					</TransformGroup>
				</UniformGrid.RenderTransform>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="1" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="2" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="3" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="4" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="5" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="6" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="7" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
				<TextBlock Margin="0,0,8,0" VerticalAlignment="Center" Text="8" TextAlignment="Center" TextWrapping="Wrap" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
			</UniformGrid>
			<UniformGrid Grid.Row="1" Columns="1" Rows="8">
                <TextBlock HorizontalAlignment="Center" Text="8" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="7" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="6" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="5" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="4" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="3" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="2" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
                <TextBlock HorizontalAlignment="Center" Text="1" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="42.667" FontWeight="Bold" FontFamily="{DynamicResource MV Boli font}">
					<TextBlock.Foreground>
						<ImageBrush Stretch="None" ImageSource="{DynamicResource Letter Background}" />
					</TextBlock.Foreground>
                </TextBlock>
			</UniformGrid>
		</Grid>
		<Button Height="23" x:Name="newGameButton" Click="NewGameButton_Click" Content="New Game" Width="75" Canvas.Top="830" Canvas.Left="8"/>
		<local:GameClock x:Name="gameClock" Canvas.Left="840" Canvas.Top="8"/>
    </Canvas>
</Window>
